// 这是歌单详情页的数据类型定义文件

// 歌单详情请求函数返回值
/*
{
  playlist:{
    "id": 7662511571,
    "name": "[听·邓紫棋] 让世界暂停一分钟",
    "coverImgId": 109951167921103800,
    "coverImgUrl": "https://p1.music.126.net/X4iqgEhliN9sraY4TNszpg==/109951167921103814.jpg"
    "createTime": 1664531265069,创建时间
    "creator"{
      "userId": 1463586082,
      "nickname": "云音乐官方歌单"
    },
    "description": "那个从前梦想长大后作一名音乐老师的小女生撰写了华语乐坛女歌手的神话...音乐世家的背景、优异的嗓音天赋、以及几乎与生俱来的创作能力奠定她之后必定似流星坠落一般地闪耀。2008年仅16岁的邓紫棋正式出道并发行了神专《睡公主》，屹立在香港乐坛的绝对顶尖位置。Get everybody Moving—让每个人都动起来；14年通过内地节目《我是歌手》正式爆火亚洲市场，自此之后，她将用独特的“邓氏唱腔”感染每个听她音乐的听众",
    "tags": [
        "华语",
        "粤语",
        "流行"
    ],
    "subscribers":[ 喜欢这个歌单的人
      {
        "avatarUrl": "http://p1.music.126.net/kz4xz_8eG9YcXGzR9oJ3xA==/109951162869177974.jpg",
        "userId": 320362220,
        "nickname": "行者1889",
      }
    ]
  }
}
*/
export interface DetailSongParams {
  playlist: DetailSong;
}
export interface DetailSong {
  id: number;
  name: string;
  coverImgId: number;
  coverImgUrl: string;
  createTime: number;
  creator: CreatorItem;
  description: string;
  tags: string[];
  subscribers: SubscriberList;
}

export interface CreatorItem {
  userId: number;
  nickname: string;
}

export type SubscriberList = SubscriberListItem[];

export interface SubscriberListItem {
  avatarUrl: string;
  userId: number;
  nickname: string;
}
// 2:获取歌单详情动态部分,如评论数,是否收藏,播放数
/*
{
    "commentCount": 21,
    "shareCount": 14,
    "playCount": 285161,
    "bookedCount": 1905,
}
*/

export interface DynamicItem {
  commentCount: number;
  shareCount: number;
  playCount: number;
  bookedCount: number;
}

// 歌曲数据返回值
/*
songs:[
          {
            "name": "多远都要在一起",
            "id": 30612793,
            "ar": [
                {
                    "id": 7763,
                    "name": "G.E.M.邓紫棋",
                }
            ],
            "dt": 216880,
            "mv": 384709,
        },
]
*/
export interface TrackAllListParams {
  songs: TrackAllList;
}

export type TrackAllList = TrackAllListItem[];

export interface TrackAllListItem {
  name: string;
  id: number;
  dt: number;
  mv: number;
  ar: ArList;
}

export type ArList = ArListItem[];

export interface ArListItem {
  id: number;
  name: string;
}

// 评论数据返回值类型
/*
hotComments:[
  {
            "user": {
                "locationInfo": null,
                "liveInfo": null,
                "anonym": 0,
                "commonIdentity": null,
                "avatarUrl": "http://p3.music.126.net/gDUNm_HbQsU7wxONNNbvvQ==/109951164261769964.jpg",
                "userId": 1617522407,
                "avatarDetail": null,
                "userType": 0,
                "followed": false,
                "mutual": false,
                "remarkName": null,
                "vipRights": null,
                "nickname": "韩商言gun神_",
                "authStatus": 0,
                "expertTags": null,
                "experts": null,
                "vipType": 0
            },
            "beReplied": [],
            "pendantData": null,
            "showFloorComment": null,
            "status": 0,
            "commentId": 1517824832,
            "content": "封面王菲 太美了[钟情][钟情][钟情][钟情]",
            "richContent": null,
            "contentResource": null,
            "time": 1560127814681,
            "timeStr": "2019-06-10",
            "needDisplayTime": true,
            "likedCount": 717,
            "expressionUrl": null,
            "commentLocationType": 0,
            "parentCommentId": 0,
            "decoration": {},
            "repliedMark": null,
            "grade": null,
            "userBizLevels": null,
            "ipLocation": {
                "ip": null,
                "location": "",
                "userId": null
            },
            "liked": false
        },
]
*/
export interface CommentsItemParams {
  comments: CommentsList; //最新评论
  hotComments: CommentsList; //这是精彩评论
  total: number;
}

export type CommentsList = commentsListItem[];

export interface commentsListItem {
  user: userItem;
  commentId: number;
  content: string;
  timeStr: string; //年月日
  time: number; //时间戳
  likedCount: number; //点赞数
}

export interface userItem {
  avatarUrl: string;
  userId: number;
  nickname: string;
}

// 请求参数
export interface GetCommentParams {
  id: number;
  limit: number;
  offset: number;
}

// 热门歌单列表数据返回类型
/*
{
{
            "creator": {
                "userId": "495212781",
                "nickname": "子度-"
            },
            "coverImgUrl": "http://p2.music.126.net/KjjSfVVJBomMHzP2YZnOJg==/109951164294871555.jpg",
            "name": "古风｜闲庭抚琴桃花酒，叶落似是故人归",
            "id": "2767811922"
        },
 */
export interface HotSongListParams {
  playlists: HotSongList;
}

export type HotSongList = HotSongListItem[];

export interface HotSongListItem {
  creator: CreatorItem;
  coverImgUrl: string;
  name: string;
  id: number;
}

export interface CreatorItem {
  userId: number;
  nickname: string;
}

// 发送评论的参数数据
export interface CommentItemParams {
  t: number;
  type: number;
  id: number;
  content: string;
  commentId?: number; //这是回复的id
}
